<%@ page pageEncoding="utf-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

<title><fmt:message key="switchRecordList.title"/></title> 
<script src="<c:url value='/scripts/common.js'/>"></script> 

<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<link rel="stylesheet" type="text/css" media="all"	href="<c:url value='/styles/layout.css'/>" />
<script src="<c:url value="/scripts/date.js"/>" language="javascript"></script>
</head>

<body leftmargin="0" topmargin="0">
<html:form action="switchRecord">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td class="home-content-title"><img src="images/home_ico_listTitle.gif" width="22" height="20" align="absmiddle">旅客签转信息管理</td>
  </tr>
  <%--<tr> 
    <td height="25" class="home-table-tool-content02">
     <input type="button" 
                class="home-table-inputbox"
        		onclick="location.href='<c:url value="/switchRecord.html?method=edit"/>'"
        		value="<fmt:message key="button.add"/>"/>
     <input type="button" class="home-table-inputbox"
        		onclick="doDelete('selected_id')"
        		value="<fmt:message key="button.delete"/>"/>	 
    </td>
  </tr>--%>
 <%--search condition start--%>
  <tr>
    <td height="40" class="home-search-space">
	 <table>
	   <tr height="30" class="home-search-space">
		  <td align=right>航班号：</td><td><html:text property="flightNum" styleId="flightNum"  styleClass="home-table-inputbox" size="10"/></td>
      	  <td align=right>日期：</td><td><html:text property="flightDate" styleId="flightDate" styleClass="home-table-inputbox"  size="10"/>
      	   <img src="images/date.gif" width="16" height="15" onclick="fPopCalendar(flightDate,flightDate);return false"/>
      	  </td>
		  <td align=right>旅客姓名：</td><td><html:text property="chineseName" styleId="chineseName"  styleClass="home-table-inputbox" size="10"/></td>
     	  <td align=right>处理：</td><td>
     	  <html:select name="switchRecordForm" property="switchType" size="1" styleId="vipTypeId" style="width:60px" >
			  	 <html:option  value="">&nbsp;</html:option> 
			  	 <html:option  value="1">退票</html:option> 
			  	 <html:option  value="2">变更</html:option> 
			  	 <html:option  value="3">签转</html:option> 
			  </html:select></td>
      	   <td align=right><input type="submit" class="home-inputBtn" name="Submit232" value="查询" ></td>
		</tr>
	</table>
  </tr>
 <%--search condition end--%>
   <tr> 
    <td valign="top"> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td class="home-table-topline"> </td>
        </tr>
        <tr> 
          <td class="home-table-leftline"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-tool-content02"><sasis:page items="${switchRecordList}"/></td>
              </tr>
              <tr> 
                <td align="center" valign="top" class="home-edittable-space">	
		<table width="100%" border="0" cellpadding="2" cellspacing="0" class="list_bordercolor">
                    <tr> 
                     <%--  
                      <td width="6%" class="home-list-title">  
                          <input type="checkbox" name="checkbox" value="checkbox" onclick="chooseAll(this)" />
                       </td>
                  --%>
                      <td  width="10%" class="home-list-title">&nbsp;航班号</td>
                      <td  width="10%" class="home-list-title">&nbsp;日期</td>
                      <td  width="10%" class="home-list-title">&nbsp;旅客姓名</td>
                      <td  width="7%" class="home-list-title">&nbsp;处理</td>
                      <td  width="7%" class="home-list-title">&nbsp;产生费用</td>
                      <td  width="10%" class="home-list-title">&nbsp;签转航班号</td>
                      <td  width="10%" class="home-list-title">&nbsp;签转后票号</td>
                      <td  width="10%" class="home-list-title">&nbsp;操作人</td>
                      <td  width="10%" class="home-list-title">&nbsp;操作时间</td>
            <%--          
		      <td class="home-list-title" width="5%">&nbsp;<fmt:message key="button.edit"/></td>		   				 
		      <td class="home-list-title"  width="5%">&nbsp;<fmt:message key="button.view"/></td> --%>
                    </tr>
                    
                    <c:forEach var="results" items="${switchRecordList}" varStatus="status">
                    <tr>
                     <%-- 
                      <td class="home-list-content"> 
                        <input type="checkbox" name="selected_id" value="<c:out value='${results.id}'/>" />
                      </td>
                      --%>
                      <td class="home-list-content">&nbsp;<c:out value="${results.flightNum}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.flightDate}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.chineseName}"/></td>
                       <td class="home-list-content">&nbsp;
                         <c:if test="${results.switchType==1}">退票</c:if>
                         <c:if test="${results.switchType==2}">变更</c:if>
                         <c:if test="${results.switchType==3}">签转</c:if></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.cost}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.switchFlightNum}"/></td>
                      <td class="home-list-content">&nbsp;<c:out value="${results.switchEtNum}"/></td>
                     
                      <td class="home-list-content">&nbsp;<c:out value="${results.operator}"/></td>
                      <td class="home-list-content">&nbsp;<fmt:formatDate value="${results.operatDate}" pattern="yyyy-MM-dd HH:mm"/></td>
		  <%-- <td class="home-list-content" width="50">&nbsp;
		    	<img src="./images/edit.gif" width="14" height="14" style="cursor:hand"  alt="<fmt:message key="button.edit"/>" onClick="window.location='./switchRecord.html?method=edit&id=<c:out value="${results.id}"/>'">&nbsp;
		    </td>
		    <td class="home-list-content" width="50">&nbsp;
		    	<img src="./images/view.gif" width="14" height="14" style="cursor:hand"  alt="<fmt:message key="button.view"/>"  onClick="MM_openBrWindow('./switchRecord.html?method=view&id=<c:out value="${results.id}"/>','','width=500,height=400')" >&nbsp;
		    </td>--%> 
                    </tr>
		</c:forEach> 
                  </table>
                </td>
              </tr>
            </table></td>
        </tr>
        <tr> 
          <td height="12"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td class="home-table-bottom-left">&nbsp;</td>
                <td class="home-table-bottom-bg">&nbsp;</td>
                <td class="home-table-bottom-right">&nbsp;</td>
              </tr>
            </table></td>
        </tr>
      </table></td>
  </tr>
  <tr> 
    <td height="10">&nbsp;</td>
  </tr>
</table>
</html:form>
</body>
<script>
//written by kellen 07-04-19
function doDelete(chkName){  
		var selected = new Array(); 
		var val = "";	  
		   for (var i=0;i < document.forms[0].elements.length; i++){
				var e = document.forms[0].elements[i];  
				if (e.name==chkName){
					var chk = document.forms[0].elements[i];
					if(chk.checked){
						var bb = e.value; 
					    	selected.push(bb);
					    	break;
					} 
				}	 
			}	 
 		if(0!=selected.length){
 			if(confirm("<fmt:message key="common.confirm.message"/>")){  
				document.forms[0].method="post";
				document.forms[0].action="./switchRecord.html?method=delete";
				document.forms[0].submit();
			}else return;	  			
		}else{
			alert("<fmt:message key="common.delete.message"/>");
		}	 
	}
</script>
</html> 